//Demo
layui.use(['form', 'jquery', 'layer'], function () {
    var form = layui.form;
    var $ = layui.jquery;
    var layer = layui.layer;

    //监听提交
    form.on('submit(formDemo)', function (data) {
        console.log(data);
        $.ajax({
             url: '/courseTable/getTable3',
             type: 'post',
             dataType: 'json',
             data: data.field,
             success: function (data) {
                 parent.$('input[name=jsProduct]').data('jsProduct', data.data);
                 var layer = parent.layer;
                 layer.close(layer.index);
             }
        });
        return false;
    });

});